package ae.pcfc.cldos.online.common.tscdb.dao.provider;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;

import ae.pcfc.cldos.online.common.dao.GenericDAO;
import ae.pcfc.cldos.online.common.tscdb.dao.TTscCityDAO;
import ae.pcfc.cldos.online.common.tscdb.domain.TTscCity;

/**
 * 
 * 
 * @author arosa
 *
 */
public class TTscCityDAOImpl extends GenericDAO implements TTscCityDAO {
	
	@SuppressWarnings("unchecked")
	public List<TTscCity> getCitiesListByCountryCode(String countryCode){
		DetachedCriteria criteria = DetachedCriteria.forClass(TTscCity.class);
		criteria.add(Restrictions.eq(TTscCity.CITY_COUNTRY_CODE, countryCode));
		return (List<TTscCity>)getListByCriteria(criteria);
	}
	
}
